package gov.nist.healthcare.testframework.client;

import gov.nist.healthcare.configuration.testframework.TestFrameworkDocument;
import gov.nist.healthcare.configuration.testframework.testagent.TestAgentConfigurationDocument;
import gov.nist.healthcare.testframework.Environment;
import gov.nist.healthcare.testframework.TestFramework;
import gov.nist.healthcare.testframework.application.generic.GenericInitiatorTestAgent;
import java.io.IOException;
import org.apache.xmlbeans.XmlException;

public class TestFrameWorkSoapInitiator {

    public static void main(String[] args) throws XmlException, IOException,
            ClassNotFoundException, InstantiationException,
            IllegalAccessException {
        TestFrameworkDocument testFrameworkDocument = TestFrameworkDocument.Factory.parse(TestFrameworkReceiver.class.getResource("/configuration/TestFrameworkInitiatorConfiguration.xml"));
        TestFramework tf = TestFramework.getInstance();
        tf.init(testFrameworkDocument);

        // Add a generic initiator test agent
        TestAgentConfigurationDocument testAgentDocument = TestAgentConfigurationDocument.Factory.parse(TestFrameworkReceiver.class.getResource("/configuration/TestAgentInitiatorConfiguration.xml"));
        GenericInitiatorTestAgent generic = (GenericInitiatorTestAgent) Environment.getInstance().addTestAgent(
                testAgentDocument);

    }

}
